package demo2;

/**
 * @Author 12629
 * @Description：
 */
public class Test {
    public void test() {
        class Inner {
            public int a = 1;
            public int b = 2;

            public void method() {
                System.out.println("method()");
            }
        }
        Inner inner = new Inner();
        inner.method();
    }

    public void test2() {
        /*Inner inner = new Inner();
        inner.method();*/

        class Inner2 {

        }
    }


    public static void main(String[] args) {

        OuterClass out = new OuterClass();
        OuterClass.InnerClass inner = out.new InnerClass();
        OuterClass.InnerClass inner2 =
                new OuterClass().new InnerClass();
        inner2.test();

    }
}
